<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\MeetingSignin
 *
 * @property int $id 主键
 * @property int $uid 关联用户
 * @property int $guest_id 嘉宾ID
 * @property float $longitude 经度
 * @property float $latitude 纬度
 * @property string|null $address 签到地点
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Models\MeetingGuest $guest
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin whereAddress($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin whereGuestId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin whereLatitude($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin whereLongitude($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin whereUid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingSignin whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class MeetingSignin extends Model
{
    protected $table = 'meeting_signin';
    protected $primaryKey = 'id';
    protected $fillable = ['uid', 'guest_id', 'longitude', 'latitude', 'address'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function guest()
    {
        return $this->belongsTo(MeetingGuest::class,'guest_id','id');
    }
}
